package lightrain.rbac.repository;

import org.springframework.stereotype.Repository;

import lightrain.db.NRepository;
import lightrain.rbac.model.User;

@Repository
public class UserRepository extends NRepository<User, Integer> {

	/**
	 * 获取用户
	 * @auther Y.hj
	 * @param username 用户名
	 * @param password 密码
	 * @return
	 */
	public User getUser(String username,String password){
		return db().where("username = ? and password = ?", username,password).find();
	}
}
